# !/bin/bash
#set -e
#supervisord --nodaemon --configuration /etc/supervisor/conf.d/supervisord.conf

if [ ! -f  "/usr/share/nginx/html/public/.example.env" ];then
    echo ".example.env文件不存在"
else
    cp  /usr/share/nginx/html/public/.example.env   /usr/share/nginx/html/public/.env
fi

#/usr/sbin/crond   -f  -L  /var/log/cron/cron.log
echo "服务启动成功"
exec redis-server &

mkdir -p /var/log/nginx/

/usr/sbin/crond
#run nginx
/usr/sbin/nginx
#run php
/usr/sbin/php-fpm82 --nodaemonize -R

